package tech.aistar.corejava.day15.pool;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/8/3 0003
 */
public class MethodDemo {
    public static void main(String[] args) {
        test(3);
    }

    //如果将n定义成final -> 延长这个n的生命 -> JS
    public static void test(int n){
       // n = 20;
        new IA() {
            @Override
            public void save() {
                //要将n当成final进行对待.

                //n = 13;
                //n = 13;
                System.out.println(n);
            }
        }.save();
    }
}

interface IA{
    void save();
}
